<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<head>
<html:base />
<title><bean:message key="Application.Name"/> ~ <bean:message key="Agreement.edit"/></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/formas.css" rel="stylesheet" type="text/css">
<link href="css/calendar.css" rel="stylesheet" type="text/css">
<style type="text/css">
#div_cal {
background-color:#FF9933;
	position:absolute;
}
</style>
<script LANGUAGE="JavaScript" type="text/javascript" src="js/AnchorPosition.js"></script>
<script LANGUAGE="JavaScript" type="text/javascript" src="js/PopupWindow.js"></script>
<script LANGUAGE="JavaScript" type="text/javascript" src="js/date.js"></script>
<script LANGUAGE="JavaScript" type="text/javascript" src="js/CalendarPopup.js"></script>
<script language="javascript" type="text/javascript" src="js/util.js"></script>
<script language="javascript" type="text/javascript">
var cal_fechas;
cal_fechas = new CalendarPopup('div_cal');
function fnc_validarForma(forma){
		var bol_retVal = true;
		var str_errores = "";
		if(Trim(forma.str_acuerdo.value)==""){
			str_errores += " - <bean:message key='Agreement.content'/> <bean:message key='errors.required'/>\n";
		}		
		if(Trim(forma.str_responsable.value)==""){
			str_errores += " - <bean:message key='Agreement.responsible.name'/> <bean:message key='errors.required'/>\n";
		}
		if(Trim(forma.str_fecha.value)==""){
			str_errores += " - <bean:message key='Agreement.responsible.deliveryDate'/> <bean:message key='errors.required'/>\n";
		}
		if( Trim(forma.str_producto.value) == "" ){
			str_errores += " - <bean:message key='Agreement.responsible.producto'/> <bean:message key='errors.required'/>\n";
		}
		if( str_errores != "" ){
			bol_retVal = false;
			alert( " <bean:message key='Application.Error(s)'/> : \n" + str_errores );
		}
		return bol_retVal;
	}
<logic:present name="req_msg">
	alert("<bean:write name='req_msg'/>");
</logic:present>
</script>
</head>
<body>
<div id="div_cal"></div>
  <table cellpadding="0" cellspacing="0" class="formas">
        <tr>
          <td>
		   <table cellpadding="0" cellspacing="0" class="barraNavegacion"> 
       			<tr>
         			<td><html:link action="/academy_welcome?action=selectAcademy" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="AcademyWelcome.Init"/></html:link>
				       		<html:link action="/draft_list?action=listDrafts" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="Agreement.drafts"/></html:link>
			        		<html:link action="/draft_edit?action=editDraft" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="Agreement.draftEdit"/></html:link>
			        		<html:link action="/agreement_list" styleClass="barraNavegacion"><img src="images/icn_liga.gif" border="0"><bean:message key="AgreementList"/></html:link>
		            </td>
    			</tr>
		    </table>
		  	<table cellpadding="0" cellspacing="0" class="titulo">
                <tr>
                	<td class="iconos_imgs"> <a href="#"><img src="images/icn_correo.gif" alt="Correo-e" width="18" height="18" border="0"></a> </td>
                  	<td class="txt_titulo"><bean:message key="Agreement"/></td>
                </tr>
            </table>
			<table cellpadding="0" cellspacing="2" class="info_formas">
        		<tr> 
         			 <td class="formas-encabezado"><bean:message key="Document.draftData"/></td>
        		</tr>
        		<tr> 
          			<td >
          				<table cellpadding="0" cellspacing="2" class="info_titulo">
              				<tr> 
                				<td class=""><strong><bean:message key="Document.draft"/></strong></td>
                				<td class=""><bean:write name="bean_minuta" property="int_tk"/> </td>
              				</tr>
              				<tr> 
                				<td class=""><strong><bean:message key="Document.content"/> </strong></td>
                				<td class=""><bean:write name="bean_minuta" property="str_asunto"/></td>
              				</tr>
            			</table>
            		</td>
        		</tr>
        		<tr> 
          			<td>&nbsp;</td>
        		</tr>
        		<tr> 
          			<td class="formas-encabezado"><bean:message key="Agreement.draftData"/></td>
        		</tr>
        		<tr> 
          			<td>
          				<html:form action="/agreement_save" onsubmit="return fnc_validarForma(this);">
          				<html:hidden property="int_responsable" />	     
          				<html:hidden property="int_id" />       			
          					<table cellpadding="0" cellspacing="2" class="info_formas">
              					<tr> 
                					<td class=""><bean:message key="Document.number"/></td>
                					<td colspan="2" class=""></td>
	              				</tr>
    	         				<tr> 
        	        				<td class=""><bean:message key="Agreement.content"/></td>
            	    				<td colspan="2" class=""><html:textarea property="str_acuerdo" cols="35" rows="4"></html:textarea></td>
              					</tr>
              					<tr> 
                					<td class=""><bean:message key="Agreement.responsible.name"/></td>
                					<td colspan="2" class="">
                						<html:text property="str_responsable" readonly="true" size="50"></html:text>                					                  					 
                					</td>
                					<td>
                						<a href="javascript:var win = centerPopUp( 'owner_search.do', 'OwnerSearch', 430,270 , 'YES' );"><html:img page="/images/usuario.gif" border="0"/></a>
                					</td>
	              				</tr>
    	          				<tr> 
        	        				<td class=""><bean:message key="Agreement.responsible.deliveryDate"/></td>
            	    				<td class="">
            	    					<html:text property="str_fecha" size="10" maxlength="12" readonly="true"></html:text>
            	    					<html:link href="javascript: cal_fechas.select(document.getElementById('str_fecha'),'cal_img','yyyy/MM/dd');"  indexed="6">
											<img name="cal_img" src="images/img_calendario.gif" border="0" width="24" height="24" alt=""/>
										</html:link>
            	    				</td>
                					<td class=""><bean:message key="StudyPlan.exams.DateFormat"/></td>                
             					 </tr>
              					<tr> 
                					<td class=""><bean:message key="StudyPlan.content.descriptiveLetter.product"/></td>
				                	<td colspan="3" class=""><html:textarea property="str_producto" cols="35" rows="4"></html:textarea></td>
	              				</tr>
    	          				<tr> 
					                <td colspan="4"> 
            	    				    <div align="center"> 
                	      					<html:submit property="btn_aceptar"><bean:message key="Application.Accept" /></html:submit>
                    	  					<input type="reset" onclick="location.href='<html:rewrite action="/agreement_list" />';" value="<bean:message key='Application.Cancel'/>"/>
                    					</div>
			        	    	    </td>
            		  			</tr>
              					<tr> 
                					<td colspan="4"> <div align="center"></div></td>
	              				</tr>
    	        			</table>
        	    		</html:form>
            		</td>
        		</tr>
      		</table>
		</td>
	</tr>
</table>  
</body>
</html:html>